<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/student/student/Students.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/student/student/Students.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '学生基本信息',
                name: 'student/Students',
                url: "/Students/",
                sortName: "id"
            });
            const editFormFields = ref({"name":"","adrss":"","classid":"","age":""});
            const editFormOptions = ref([[{"title":"","field":"name"}],
                              [{"title":"","field":"adrss"}],
                              [{"title":"","field":"classid","type":"number"}],
                              [{"title":"","field":"age","type":"number"}]]);
            const searchFormFields = ref({"name":""});
            const searchFormOptions = ref([[{"title":"","field":"name"}]]);
            const columns = ref([{field:'Id',title:'Id',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'name',title:'name',type:'string',width:220,align:'left',sort:true},
                       {field:'adrss',title:'adrss',type:'string',width:220,align:'left'},
                       {field:'classid',title:'classid',type:'int',width:110,align:'left'},
                       {field:'age',title:'age',type:'int',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
